package com.capsulode.excel;

import com.capsulode.excel.annotation.Header;
import com.capsulode.excel.annotation.RowNum;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.Date;


public class RowBeanWithAnnotation {
    @RowNum
    private int rowNum;
    @Header("姓名")
    @NotEmpty
    private String name;
    @Header(value = "性别", dictionary = {Header.EMPTY, "男", "女"})
    private int sex = 1;
    @Header("入学年份")
    private int year = 2000;
    @Header("手机号码")
    @NotEmpty
    @Size(min = 11, max = 14)
    private String mobile;
    @Header("登录密码")
    @NotEmpty
    private String password;
    @Header("会员卡号")
    @NotEmpty
    private String vipCard;
    @Header("洗衣卡号")
    @NotEmpty
    private String washCard;
    @Header(value = "开户缴费（元）", currency = Header.Currency.RMB)
    @Min(0)
    private int money;
    @Header(value = "赠送金额（元）", currency = Header.Currency.RMB)
    @Min(0)
    private int giftMoney;
    @Header("免洗次数")
    @Min(0)
    private Integer freeCount;
    @Header(value = "会员身份", dictionary = {Header.EMPTY, "学生", "教职工"})
    private int type = 1;
    @Header("出生日期")
    private Date birthDay;
    @Header("身份证号码")
    private String idCard;
    @Header("qq号码")
    private String qq;
    @Header("备注")
    private String remark;

    public int getRowNum() {
        return rowNum;
    }

    public void setRowNum(int rowNum) {
        this.rowNum = rowNum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getVipCard() {
        return vipCard;
    }

    public void setVipCard(String vipCard) {
        this.vipCard = vipCard;
    }

    public String getWashCard() {
        return washCard;
    }

    public void setWashCard(String washCard) {
        this.washCard = washCard;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public int getGiftMoney() {
        return giftMoney;
    }

    public void setGiftMoney(int giftMoney) {
        this.giftMoney = giftMoney;
    }

    public Integer getFreeCount() {
        return freeCount;
    }

    public void setFreeCount(Integer freeCount) {
        this.freeCount = freeCount;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Date getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(Date birthDay) {
        this.birthDay = birthDay;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("RowBean{");
        sb.append("rowNum=").append(rowNum);
        sb.append(", name='").append(name).append('\'');
        sb.append(", sex=").append(sex);
        sb.append(", year=").append(year);
        sb.append(", mobile='").append(mobile).append('\'');
        sb.append(", password='").append(password).append('\'');
        sb.append(", vipCard='").append(vipCard).append('\'');
        sb.append(", washCard='").append(washCard).append('\'');
        sb.append(", money=").append(money);
        sb.append(", giftMoney=").append(giftMoney);
        sb.append(", freeCount=").append(freeCount);
        sb.append(", type=").append(type);
        sb.append(", birthDay=").append(birthDay);
        sb.append(", idCard='").append(idCard).append('\'');
        sb.append(", qq='").append(qq).append('\'');
        sb.append(", remark='").append(remark).append('\'');
        sb.append('}');
        return sb.toString();
    }
}